package com.aluvfy.controller;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

//注意：Tomcat10版本和javax的WebServlet不兼容，会导致项目index不能访问到服务器  兼容问题真恶心
@WebServlet("/demo")
public class DemoServlet extends HttpServlet {
    /**
     * 客服端：<a href="/demo">访问服务器</a>
     */
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("服务器访问到了。。。。。。。。");
        req.getRequestDispatcher("/main.jsp").forward(req,resp);
    }
}
